{extend name="public:layout" /}
{block name="title"}订单详情{/block}
{block name="head"}
<style>
    .gray-bg {
        background: #fff;
    }

    #form {
        padding-top: 8px;
    }

    .form-group {
        padding-bottom: 8px;
        border-bottom: 1px solid #f4f4f4;
        margin-bottom: 8px;
    }

    .wrapper {
        padding: 0;
    }
</style>
{/block}
{block name="body"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="ibox">
        <div class="ibox-title">
            <ol class="breadcrumb">
                <li><i class="fa fa-hand-o-right"></i> <a href="{:url('index')}"> 退款列表</a></li>
                <li class="active">处理退款</li>
            </ol>
        </div>
        <div class="ibox">
            <div class="ibox-content">
                <form method="post" class="form-horizontal" id="form">
                    <input name="refund_id" type="hidden" value="{$refundInfo['refund_id']}">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">订单编号:</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">
                                <a href="javascript:;" onclick="showDetail(this)" data-url="{:url('ShopOrder/orderDetail',['order_sn'=>$orderInfo['order_sn']])}">{$refundInfo.order_sn}</a>
                            </p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">客户信息:</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">下单人:{$refundInfo.buyer_username}</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">支付内容:</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">订单金额:<span
                                    class="text-danger">{$orderInfo.order_price}</span>元 已支付:<span class="text-success">{$orderInfo.pay_price}</span>元
                            </p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">退款方式:</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">{$refundInfo.refund_type_text}</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">申请原因:</label>
                        <div class="col-sm-10">
                            <p class="form-control-static">{$refundInfo.buyer_message}</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">退款金额:</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="refund_amount" value="{$refundInfo.refund_amount}"/>
                        </div>
                        <label class="col-sm-2 control-label">经手人:</label>
                        <div class="col-sm-4">
                            <input type="text" class="form-control" name="action_name" value="{$actionName}"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">商家备注:</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" name="seller_message" value="{$refundInfo.seller_message}"/>
                        </div>
                    </div>
                    <div class="form-group" id="type">
                        <label class="col-sm-2 control-label Validform_label">是否同意</label>
                        <div class="col-sm-4">
                            <label class="radio-inline i-checks">
                                <input type="radio" name="seller_status" value="-1" checked> 不同意
                            </label>
                            <label class="radio-inline i-checks">
                                <input type="radio" name="seller_status" value="1"> 同意
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-10 col-sm-offset-2">
                            <button class="btn btn-primary" type="button" id="btnSub">
                                确定
                            </button>
                            <a href="{:url('ShopOrderRefund/index')}" class="btn btn-white">取消返回</a>
                            <span id="validError"></span>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        iCheck();
        ajaxSubForm('#btnSub');
    });
    //显示订单详情
    function showDetail(obj) {
        var url = $(obj).data('url');
        openDialog('订单详情', url, '800px', '520px');
    }
</script>
{/block}